import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '作业内容',
    align:"center",
    dataIndex: 'content'
  },
  {
    title: '预约编号',
    align:"center",
    dataIndex: 'number'
  },
  {
    title: '作业原因',
    align:"center",
    dataIndex: 'jobReason_dictText'
  },
  {
    title: '归属装置',
    align:"center",
    dataIndex: 'device_dictText'
  },
  {
    title: '归属单元',
    align:"center",
    dataIndex: 'cell_dictText'
  },
  {
    title: '作业类型',
    align:"center",
    dataIndex: 'jobType_dictText'
  },
  {
    title: '作业开始时间',
    align:"center",
    dataIndex: 'planStartDate'
  },
  {
    title: '作业结束时间',
    align:"center",
    dataIndex: 'planEndDate'
  },
  {
    title: '作业所属部门',
    align:"center",
    dataIndex: 'applyCompany_dictText'
  },
  {
    title: '作业申请人',
    align:"center",
    dataIndex: 'applicant_dictText'
  },
  {
    title: '申请时间',
    align:"center",
    dataIndex: 'applyTime'
  },
  {
    title: '作业部位',
    align:"center",
    dataIndex: 'position'
  },
  {
    title: '施工单位',
    align:"center",
    dataIndex: 'operationCompany'
  },
  {
    title: '作业所属单位负责人',
    align:"center",
    dataIndex: 'operationChargePerson_dictText'
  },
  {
    title: '施工单位负责人',
    align:"center",
    dataIndex: 'constructionMan'
  },
  {
    title: '作业地点',
    align:"center",
    dataIndex: 'locations'
  },
  {
    title: '公司监护人',
    align:"center",
    dataIndex: 'companyGuardian_dictText'
  },
  {
    title: '施工单位监护人',
    align:"center",
    dataIndex: 'constructionGuardian'
  },
  {
    title: '关联的其他特殊作业及安全作业票编号',
    align:"center",
    dataIndex: 'relevanceNumber_dictText'
  },
  {
    title: '危害辨识',
    align:"center",
    dataIndex: 'riskIdentificationResult_dictText'
  },
  {
    title: '定位',
    align:"center",
    dataIndex: 'orientation'
  },
  {
    title: '监控选择',
    align:"center",
    dataIndex: 'videoId_dictText'
  },
  {
    title: '状态',
    align:"center",
    dataIndex: 'deleted_dictText'
  },
  {
    title: '作业状态',
    align:"center",
    dataIndex: 'status_dictText'
  },
];

//子表列表数据
export const tbJobTicketColumns: BasicColumn[] = [
  {
    title: '作业内容',
    align:"center",
    dataIndex: 'content'
  },
  {
    title: '预约编号',
    align:"center",
    dataIndex: 'number'
  },
  {
    title: '作业原因',
    align:"center",
    dataIndex: 'jobReason_dictText'
  },
  {
    title: '归属装置',
    align:"center",
    dataIndex: 'device_dictText'
  },
  {
    title: '归属单元',
    align:"center",
    dataIndex: 'cell_dictText'
  },
  {
    title: '作业类型',
    align:"center",
    dataIndex: 'jobType_dictText'
  },
  {
    title: '作业开始时间',
    align:"center",
    dataIndex: 'planStartDate'
  },
  {
    title: '作业结束时间',
    align:"center",
    dataIndex: 'planEndDate'
  },
  {
    title: '作业所属部门',
    align:"center",
    dataIndex: 'applyCompany_dictText'
  },
  {
    title: '作业申请人',
    align:"center",
    dataIndex: 'applicant_dictText'
  },
  {
    title: '申请时间',
    align:"center",
    dataIndex: 'applyTime'
  },
  {
    title: '作业部位',
    align:"center",
    dataIndex: 'position'
  },
  {
    title: '施工单位',
    align:"center",
    dataIndex: 'operationCompany'
  },
  {
    title: '作业所属单位负责人',
    align:"center",
    dataIndex: 'operationChargePerson_dictText'
  },
  {
    title: '施工单位负责人',
    align:"center",
    dataIndex: 'constructionMan'
  },
  {
    title: '作业地点',
    align:"center",
    dataIndex: 'locations'
  },
  {
    title: '公司监护人',
    align:"center",
    dataIndex: 'companyGuardian_dictText'
  },
  {
    title: '施工单位监护人',
    align:"center",
    dataIndex: 'constructionGuardian'
  },
  {
    title: '关联的其他特殊作业及安全作业票编号',
    align:"center",
    dataIndex: 'relevanceNumber_dictText'
  },
  {
    title: '危害辨识',
    align:"center",
    dataIndex: 'riskIdentificationResult_dictText'
  },
  {
    title: '定位',
    align:"center",
    dataIndex: 'orientation'
  },
  {
    title: '监控选择',
    align:"center",
    dataIndex: 'videoId_dictText'
  },
  {
    title: '作业状态',
    align:"center",
    dataIndex: 'status_dictText'
  },
  {
    title: '状态',
    align:"center",
    dataIndex: 'deleted_dictText'
  },
];

// 高级查询数据
export const superQuerySchema = {
  content: {title: '作业内容',order: 0,view: 'textarea', type: 'string',},
  number: {title: '预约编号',order: 1,view: 'text', type: 'string',},
  jobReason: {title: '作业原因',order: 2,view: 'list', type: 'string',dictCode: 'jobReason',},
  device: {title: '归属装置',order: 3,view: 'list', type: 'string',dictTable: "tb_base_risk_device", dictCode: 'id', dictText: 'name',},
  cell: {title: '归属单元',order: 4,view: 'list', type: 'string',dictTable: "tb_base_risk_unit", dictCode: 'id', dictText: 'risk_unit_name',},
  jobType: {title: '作业类型',order: 5,view: 'text', type: 'string',dictCode: 'jobType',},
  planStartDate: {title: '作业开始时间',order: 6,view: 'datetime', type: 'string',},
  planEndDate: {title: '作业结束时间',order: 7,view: 'datetime', type: 'string',},
  applyCompany: {title: '作业所属部门',order: 8,view: 'sel_depart', type: 'string',},
  applicant: {title: '作业申请人',order: 9,view: 'sel_user', type: 'string',},
  applyTime: {title: '申请时间',order: 10,view: 'datetime', type: 'string',},
  position: {title: '作业部位',order: 11,view: 'text', type: 'string',},
  operationCompany: {title: '施工单位',order: 12,view: 'text', type: 'string',},
  operationChargePerson: {title: '作业所属单位负责人',order: 13,view: 'sel_user', type: 'string',},
  constructionMan: {title: '施工单位负责人',order: 14,view: 'text', type: 'string',},
  locations: {title: '作业地点',order: 15,view: 'text', type: 'string',},
  companyGuardian: {title: '公司监护人',order: 16,view: 'sel_user', type: 'string',},
  constructionGuardian: {title: '施工单位监护人',order: 17,view: 'text', type: 'string',},
  relevanceNumber: {title: '关联的其他特殊作业及安全作业票编号',order: 18,view: 'list_multi', type: 'string',},
  riskIdentificationResult: {title: '危害辨识',order: 19,view: 'list_multi', type: 'string',dictCode: 'jobRiskIdentification',},
  orientation: {title: '定位',order: 20,view: 'text', type: 'string',},
  videoId: {title: '监控选择',order: 21,view: 'list', type: 'string',dictTable: "tb_video", dictCode: 'id', dictText: 'name',},
  deleted: {title: '状态',order: 22,view: 'radio', type: 'string',dictCode: 'jobStatus',},
  status: {title: '作业状态',order: 23,view: 'radio', type: 'string',dictCode: 'normalOrStop',},
};
